package ufrgs.inf.delphos.extraction.java;

import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTParser;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.ICompilationUnit;


public class JavaParser {
	
	public CompilationUnit createAST(ICompilationUnit compilationUnit) {
		
		ASTParser parser = ASTParser.newParser(AST.JLS3);
		parser.setResolveBindings(true);

		parser.setSource(compilationUnit);
		return (CompilationUnit) parser.createAST(null);
	}

}
